<html>
<?php
include '../lib/libLoader.php';
//team.play<br/>
//dupa<br/>

echo $_SERVER['SERVER_ADDR']." ip serwera<br/>";
echo $_SERVER['REMOTE_ADDR']." ip serwera<br/>";
if (isset($_SERVER['PATH_INFO'])){
	echo $_SERVER['PATH_INFO']." ip serwera<br/>";
}


echo $_SERVER['SCRIPT_NAME']." script name<br/><br/>";
echo $_SERVER['REQUEST_URI']." request url<br/><br/>";
echo $_SERVER['QUERY_STRING']." query string<br/><br/>";


$arrParams = array();
$strDefaultPath = '/newsy/pokaz/strona/1';
$_SERVER['PATH_INFO'] = isset( $_SERVER['PATH_INFO'] ) ? $_SERVER['PATH_INFO'] : $strDefaultPath;
$arrParams = explode( '/', substr( $_SERVER['PATH_INFO'], 1) );
echo '<pre>';
var_export( $arrParams );
echo '<pre>';


echo '<pre>';
print_r($GLOBALS);
echo '</pre>';

//$path_array = explode("/",$PATH_INFO);
//echo $path_array;
//echo"loda lamo";

//include '../lib/entities/user.php';

$comm = new communicator(3,"gg");

$user = new user(0);
$user->addCommunicator($comm,"2945196");
$user->addCommunicator($comm,"2945196");
$user->remCommunicator($comm);
$user->remCommunicator($comm);

$user2 = new user(2);



print_r($user);
print_r($user2);

//$testVar = new int();
//$testVar
//string $test;
//settype();

echo gettype( $user). "\n" ;
echo get_class($user) . "\n" ;

//$chybadupa = (string)$user->blabla($user2);
$chybadupa = (string)0;
echo  $chybadupa. "\n". "\n" ;

$time = time();
echo "\n";
echo gettype( $time). " time var type\n" ;
echo "\n";
echo get_class($time) . " time var class\n" ;
echo "\n";
echo $time;
echo "\n";
echo "\n";




$tempComment = new comment(8,"tyuj",$time,$user);
print_r($tempComment);

echo "\n";
$tempDate =date("m/d/y",$time); 
echo $tempDate;
echo "\n";
$srodek = "godz:";
$tempDate = date("d/m/y - H:i:s", $time);
 echo $tempDate;
 echo "\n";
 echo "\n";
 
 
  $dzien   = 10;
   $miesiac = 4;
   $rok     = 2002;
   $godzina = 12;
   $minuta  = 32;
   $sekunda = 0;
   $ts = mktime($godzina, $minuta , $sekunda, $miesiac, $dzien, $rok);
   
   echo $ts." zrobione";
echo "\n";
$tempDate = date("d/m/y - H:i:s", $ts);
 echo $tempDate;
 echo "\n";
 
 echo "\n";
 echo "for each key->value\n";
 
 $a = array(
    "one" => 1,
    "two" => 2,
    "three" => 3,
    "seventeen" => 17
);

foreach ($a as $k => $v) {
    echo "\$a[$k] => $v.\n";
}

?>
</html>

